-- GENERATED SPELL FOR [Bloodmaul Taskmaster] --


function spell0_22160(pUnit, Event) --@Bloodmaul Rage,Self--
pUnit:FullCastSpellOnTarget(37786,pUnit)
pUnit:RegisterEvent('Sorts_22160', 9000, 1)
end

function spell1_22160(pUnit, Event) --@Knockdown,n/a--
pUnit:FullCastSpellOnTarget(37592,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22160', 1000, 1)
end

function Sorts_22160(pUnit, Event)
local choix_sorts_22160 = math.random(0, 1)
if choix_sorts_22160 == 0 then
pUnit:RegisterEvent('spell0_22160', 1, 1)
end
if choix_sorts_22160 == 1 then
pUnit:RegisterEvent('spell1_22160', 1, 1)
end
end

function mob22160_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22160', math.random(1500, 3000), 1)
end

function mob22160_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22160_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22160_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22160, 1, 'mob22160_Action')
RegisterUnitEvent(22160, 2, 'mob22160_Leave')
RegisterUnitEvent(22160, 3, 'mob22160_Kill')
RegisterUnitEvent(22160, 4, 'mob22160_Die')
